package com.bcqn.service;

import com.bcqn.dao.UserMapper;
import com.bcqn.model.User;
import com.github.pagehelper.PageHelper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserService {

    @Resource
    private UserMapper userMapper;

    public int insertUser(User user) {
        return userMapper.insertSelective(user);
    }

    public int updateUser(User user) {
        return userMapper.updateByPrimaryKeySelective(user);
    }


    public User getUserByOpenid(String openid) {
        return userMapper.selectUserByOpenId(openid);
    }

}
